package com.cjm.algorithm.str;

public class Ti240422344 {
    public static void main(String[] args) {
        Ti240422344 t1 = new Ti240422344();
        char[] s = {'a', 'b', 'c', 'd', 'e', 'f', 'g'};
        t1.reverseString(s);
        System.err.println("OK");
    }
    public void reverseString(char[] s) {
        if (s.length == 0) return;
        for (int i = 0; i < s.length/2; i++) {
            char a = s[i];
            s[i] = s[s.length - 1 - i];
            s[s.length - 1 - i] = a;
        }
    }
}
